import 'dart:convert';

import 'package:enterprise_v6_app/app/data/entities/application/special_list/process_list_entity.dart';
import 'package:enterprise_v6_app/app/data/entities/application/special_list/process_nodes_entity.dart';
import 'package:enterprise_v6_app/generated/json/base/json_field.dart';
import 'package:enterprise_v6_app/generated/json/process_currency_arrange_entity.g.dart';

export 'package:enterprise_v6_app/generated/json/process_currency_arrange_entity.g.dart';

/// 隐患排查流程部署实体类
@JsonSerializable()
class ProcessCurrencyArrangeEntity {
  ProcessCurrencyArrangeEntity();

  factory ProcessCurrencyArrangeEntity.fromJson(Map<String, dynamic> json) => $ProcessCurrencyArrangeEntityFromJson(json);

  ///	隐患排查记录ID
  String? checkRecordId = '';

  ///	隐患上报图片集合[数组]
  List<String>? dangerImages = [];

  ///	隐患排查描述(上报人)
  String? dangerRecordDesc = '';

  ///	隐患上报视频集合[数组]
  List<String>? dangerVideo = [];

  ///	隐患上报语音集合[数组]
  List<String>? dangerVoice = [];

  /// 流程节点数据
  List<ProcessNodesEntity>? processNodes = [];

  // /// 确认人姓名
  // String? registrant = '';
  //
  // ///	隐患确认人ID
  // String? registrantUserId = '';

  /// 任务执行状态 0：正常 1：补检 2：容错
  String? isInspection;
  
  /// 确认人姓名
  String? confirmBy = '';

  ///	隐患确认人ID
  String? confirmUserId = '';

  ///	风险分析对象名称
  String? riskObjectName = '';

  ///	风险事件ID
  String? riskEventId = '';

  ///	风险措施ID
  String? riskMeasureId = '';

  ///	风险分析对象ID
  String? riskObjectId = '';

  ///	风险分析单元名称
  String? riskUnitName = '';

  ///	风险任务id
  String? riskTaskId = '';

  ///	风险分析单元ID
  String? riskUnitId = '';

  /// 流程模板数据
  ProcessListEntity? rtCertificateField = ProcessListEntity();

  Map<String, dynamic> toJson() => $ProcessCurrencyArrangeEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
